package com.lwz.eduservice.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author Lw中
 * @date 2020/11/21 10:45
 */

@FeignClient(name = "service-order", fallback = OrderClientImpl.class)
@Component
public interface OrderClient {

    /**
     * 通过用户id和课程id查询课程是否被用户购买
     * @param courseId
     * @param memberId
     * @return
     */
    @GetMapping("/order/order/isBuyCourse/{courseId}/{memberId}")
    public boolean isBuyCourse(@PathVariable String courseId, @PathVariable String memberId);

}
